import 'package:coinbaby/common/const/cosnt.dart';
import 'package:coinbaby/common/textstyle/textstyle.dart';
import 'package:flutter/material.dart';

import 'bannerscroll.dart';
import 'moneybord.dart';

class HomeHeaderView extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    final size = MediaQuery.of(context).size;
    final padding = MediaQuery.of(context).padding;
    return SizedBox(
      height: size.height * 0.46,
      child: Stack(
        children: <Widget>[
          Container(
            height: size.height * 0.23,
            color: AppColor.blue,
          ),
          Positioned(
            top: 0,
            right: 0,
            left: 0,
            child: SafeArea(
              child: Padding(
                padding: const EdgeInsets.all(15.0),
                child: Column(
                  children: <Widget>[
                    Container(
                      alignment: Alignment.center,
                      child: Text("首页", style: AppFont.textStyle(17, Colors.white, fontWeight: FontWeight.bold),)
                    ),
                    Container(
                      height: size.height * 0.22,
                      margin: const EdgeInsets.only(top: 10),
                      decoration: BoxDecoration(
                        color: Colors.white,
                        borderRadius: BorderRadius.circular(20),
                        boxShadow: [
                          BoxShadow(
                            color: Colors.black12,
                            spreadRadius: 0,
                            blurRadius: 5,
                            offset: Offset(0, 2),
                          ),
                        ]
                      ),
                      child: HomeMoneyView(),
                    ),
                    SizedBox(height: 15,),
                    SizedBox(
                      height: size.height * 0.1,
                      child: BannerView()
                    )
                  ],
                ),
              ),
            ),
          ),
        ],
      ),
    );
  }
}